package main

import "fmt"

func main() {
	var i []interface{}

	i=append(i,10,3.14,"string",demo)

	for _,data:=range i{
		switch v := data.(type) {
		case int:
			fmt.Printf("整型数据：%v\n",v)
		case float64:
			fmt.Printf("浮点数据：%v\n",v)
		case string:
			fmt.Printf("字符串：%v\n",v)
		case func():
			fmt.Printf("函数：%T\n",v)
			v()
		}
	}

}
func demo(){

}
